<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ include file="/include/taglibs.jsp"%>
<html>
<head>
<title>iPecker Robot Web Configuration</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="wed, 26 Feb 1997 08:21:57 GMT">
<link rel="stylesheet" type="text/css" href="styles/masakiForm.css">
<meta http-equiv="pragma" content="no-cache">
<link href="styles/huaxia.common.validator.css" rel="stylesheet"
	type="text/css" />
<link href="styles/huaxia.common.message.css" rel="stylesheet"
	type="text/css" />
<link href="styles/huaxia.common.input.css" rel="stylesheet"
	type="text/css" />

<script type="text/javascript" src="scripts/public.prototype.js"></script>
<script type="text/javascript" src="scripts/huaxia.common.validator.js"></script>
<script type="text/javascript" src="scripts/huaxia.common.message.js"></script>
<script type="text/javascript" src="scripts/hx.utils.js"></script>

</head>
<body style="background-color: #FDFDFD;">
<center>
<div id="errormsgspace" style="display: none;width: 600px"></div>
<div id="successmsgspace" style="display: none; width: 600px"></div>

<form id="frminput" name="frminput" action="" method="post">
<table width="600" border="0" cellpadding="0" cellspacing="0">
	<tbody>
		<tr>
			<td class="title" width="7"><img src="images/arc.gif" width="7"
				height="24"></td>
			<td class="title" valign="middle" width="100%" align="left">记录模式配置</td>
		</tr>
		<tr>
			<td colspan="2">
			<table width="100%" border="0" cellpadding="0" cellspacing="0">
				<tbody>
					<tr>
						<td width="500" align="center">
						<table class="space" width="100%" align="center" border="0"
							cellpadding="0" cellspacing="0">
							<tbody>
								<tr>
									<td>基本参数</td>
								</tr>
							</tbody>
						</table>
						<table class="space" width="100%" border="1" cellpadding="0"
							cellspacing="0">
							<tbody>
								<tr>
									<td>
									<table border="0">
										<tbody>
										   <tr>
											<td>录像/抓包间隔时间：</td>
												<td><input name="movCapTime" property="录像/抓包时间间隔" class="required validate-alphanum"
													id="movCapTime" value="${configBean.movCapTime}" size="32" maxlength="32" type="text"> 秒</td>
											</tr>											
											<tr>
												<td>记录模式: ${configBean.recordMode}</td>
												<td><select id="recordMode" name="recordMode" style="width:125px;" property="记录模式">	
														<option value="1">触发记录</option>
														<option value="0">不记录</option>														
														<option value="2">全部记录</option>																									
												    </select></td>
											</tr>
											<tr>
												<td>图片格式:</td>
												<td><select id="capFormat" name="capFormat" style="width:125px;" property="图片格式">	
														<option value="JPEG">JPEG</option>
														<option value="GIF">GIF</option>
														<option value="PNG">PNG</option>
														<option value="BMP">BMP</option>																																					
												    </select></td>
											</tr>										
											<tr>
												<td>视频质量:</td>
												<td><input name="videoQuanlity" property="视频质量" class="required validate-alphanum"
													id="videoQuanlity" value="${configBean.videoQuanlity}" size="32" maxlength="32" type="text"></td>
											</tr>											
											<tr>
												<td>图片捕获时间:</td>
												<td><input name="capInterval" property="图片捕获时间" class="required validate-alphanum"
													id="capInterval" value="${configBean.capInterval}" size="32" maxlength="32" type="text"> 秒</td>
											</tr>										
										</tbody>
									</table>
									</td>
								</tr>
							</tbody>
						</table>						
						</td>
						<td class="vline" rowspan="15"><br>
						</td>
					</tr>
					<tr>
						<td class="hline"><img src="images/empty.gif" width="1"
							height="1"></td>
					</tr>
					<tr>
						<td class="tail" height="30">&nbsp;&nbsp;<input name="Save"
							class="button" id="Save" value="保 存" type="button"
							onclick="frm_submit(this.form)"> &nbsp;&nbsp;<input
							name="help" class="button" id="help" value="取消"
							onClick="doHelp();" type="button"></td>
					</tr>
					<tr>
						<td class="hline"><img src="images/empty.gif" width="1"
							height="1"></td>
					</tr>					
				</tbody>
			</table>
			</td>
		</tr>
	</tbody>
</table>
</form>
<script type="text/javascript">
			<c:set var="exceptionType">org.apache.struts.action.EXCEPTION</c:set>
			<c:set var="exception" value="${requestScope[exceptionType]}" />
			var error_msgs = new messager('errormsgspace',{messageType : 'ERROR', isImmediate : true});
			
			<c:if test="${exception != null}">
					error_msgs.addMessage('${exception.message}','<bean:message key="${exception.message}" bundle="${exception.bundle}" />');
			</c:if>
			
			var success_msgs = new messager('successmsgspace',{messageType : 'INFORMATION', isImmediate : true});
			
			<c:forEach var='message' items="${MessageCenter.messages}">
					success_msgs.addMessage('${message.message}','<bean:message key="${message.message}" bundle="${message.bundle}" />');
			</c:forEach>
			function msgAppender(element, message){
					error_msgs.addMessage('hxv-' + element.id,message);
			}									
			function msgRemover(element){
					error_msgs.removeMessage('hxv-' + element.id);
			}
			
</script> <script type="text/javascript">
var validator = new hxvalidator('frminput',{messageAppender : msgAppender,messageRemover : msgRemover});

function frm_submit(obj){	
	obj.action="RobotRecordModeCfgModifyAction.do";
	if(!validator || validator.validate()){
		obj.submit();
	}
}

selectOption('capFormat','${configBean.capFormat}');
selectOption('recordMode','${configBean.recordMode}');

</script>
</center>
</body>
</html>